package chapter2;

import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Text;


/**
 * @author luik
 * simple clase que crea una ventana y visualiza "luik"
 * 
 */
public class helloJFace extends ApplicationWindow{
	
	public helloJFace() {
		super(null);
	}
	
	@Override
	protected Control createContents(Composite parent) {
		// TODO Auto-generated method stub
		Text text = new Text(parent, SWT.CENTER);
		text.setText("luik");
		parent.pack();
		return super.createContents(parent);
	}
	
	public static void main(String[] args) {
		helloJFace win = new helloJFace();
		win.setBlockOnOpen(true);
		win.open();
		
		Display.getCurrent().dispose();
	}

}
